package ooday02;

public class AniamlTest {
    public static void main(String[] args) {
        Dog dog =new Dog("小黑",2,"黑");
        //在 Java 中，创建某类的实例时，一定会自动调用构造方法 ，注意区分方法和构造方法
        dog.eat();
        dog.lookHome();
        dog.drink();
        Chick chick =new Chick("小花",1,"花");
        chick.eat();
        chick.LayEggs();
        chick.drink();

        Fish fish=new Fish("小金",2,"金");
        fish.eat();
        fish.drink();
 /*Animal animal 只要是数据类型就能声明变量*/
        Animal animal =new Animal("one",4,"ooo");
        animal.eat();
    }
}
